package com.weiweiqin.service.impl;

import java.util.List;

import com.weiweiqin.dao.UserDeviceRelatDao;
import com.weiweiqin.model.UserDeviceRelat;
import com.weiweiqin.service.UserDeviceRelatService;

public class UserDeviceRelatServiceImpl implements UserDeviceRelatService {

	private UserDeviceRelatDao userDeviceRelatDao;

	public void save(UserDeviceRelat userDeviceRelat) {
		userDeviceRelatDao.insert(userDeviceRelat);		
	}

	public UserDeviceRelatDao getUserDeviceRelatDao() {
		return userDeviceRelatDao;
	}

	public void setUserDeviceRelatDao(UserDeviceRelatDao userDeviceRelatDao) {
		this.userDeviceRelatDao = userDeviceRelatDao;
	}

	public List<UserDeviceRelat> getByDeviceId(int deviceId) {
		
		return userDeviceRelatDao.getByDeviceId(deviceId);
	}

	public List<UserDeviceRelat> getByUserName(String userName) {
		
		return userDeviceRelatDao.getByUserName(userName);
	}

	public UserDeviceRelat get(int id) {
		return userDeviceRelatDao.get(id);
	}

	public void update(UserDeviceRelat userDeviceRelat) {
		userDeviceRelatDao.update(userDeviceRelat);
	}

	public void delete(int id) {
		userDeviceRelatDao.delete(id);
		
	}
}